spmodel: Spatial statistical modeling and prediction in R

spmodel is an R package used to fit, summarize, and predict for a variety spatial statistical models applied to point-referenced or areal (lattice) data. Parameters are estimated using various methods, including likelihood-based optimization and weighted least squares based on variograms. Additional modeling features include anisotropy, non-spatial random effects, partition factors, big data approaches, and more. Model-fit statistics are used to summarize, visualize, and compare models. Predictions at unobserved locations are readily obtainable.


8
-Response to comment 9 We have addressed all reviewer comments in this document and look forward to 10 resubmitting the manuscript. If there is any dissatisfaction regarding the way we 11 addressed specific comments, please let us know and we will revise appropriately. 12 Reviewer 1 13 Data are always plural. Change "data is" to "data are" throughout, with the 14 exception of the object named "data".

15
-We have incorporated this change throughout.  Lines 238-239: I suggest reminding the reader that both models are fit using the 22 default estimation method, REML, and so AIC and AICc are both valid for model 23 comparison. Alternatively, you could add the estmethod = "reml" to the function 24 call to make it more obvious.

25
-We have added the following sentence at the end of the referenced paragraph: 26 "Recall that these AIC and AICc comparisons are valid because both models 27 are fit using restricted maximum likelihood (the default help("generic.spmodel", "spmodel") (e.g., help("fitted.spmodel", 49 "spmodel"), help("summary.spmodel", "spmodel"), 50 help("plot.spmodel", "spmodel"), help("predict.spmodel", 51 "spmodel"), help("tidy.spmodel", "spmodel"), etc. -The levels of the variable in newdata must be a subset of the levels in data. 74 We have added the following two sentences to elucidate: "Additionally, if an 75 explanatory variable is categorical or a factor, the values of this variable in 76 newdata must also be values in data (e.g., if a categorical variable with 77 values "A", and "B" was used to fit the model, the corresponding variable in 78 newdata cannot have a value "C")." Redaction style: Clearly, the manuscript is written following the style of a paper 119 submitted to "Journal of Statistical Software" or "The R Journal". I am not 120 member of the Editorial Board of PLOS ONE, so I do not see myself qualified to 121 judge whether the current style of the manuscript is appropriate to be published 122 in this journal.

123
-This review comment is not applicable to us, though we do note that PLOS 124 One has published several manuscripts of this nature (i.e., manuscripts that 125 detail an R package and interweave text and code).

126
Introduction: Very few references are included in the first part of the introduction 127 section and most of them are packages/papers written by the authors of the 128 present manuscript. Please, include additional references to spatial random 129 sampling and statistical analysis of spatial data (as for example, [4]).

130
-We have rewritten this paragraph. We decided to omit a discussion about the 131 analysis of design-based spatial data, as it seems to distract from the focus of 132 the manuscript, which is describing model-based inference. Thus we have 133 removed the relevant citations written by the manuscript authors and include 134 a reference to a discussion about model-based vs design-based inference for 135 spatial data. We then added multiple references, including the one suggested. 136 The relevant paragraph now reads: "spmodel implements model-based 137 inference, which relies on fitting a statistical model. Model-based inference is 138 different than design-based inference, which relies on random sampling and 139 estimators that incorporate the properties of the random sample [5].

152
Introduction: When reviewing the existing R packages to analyze and estimate 153 areal data, I suggest the authors to include also the "diseasemapping" [8] and 154 "bigDM" [9] packages. Additional packages for disease mapping and areal data 155 analysis can be found in the CRAN Task View "Analysis of Spatial Data" 156 (https://cran.r-project.org/web/views/Spatial.html)

157
-We have added the "bigDM" citation [9]. The "diseasemapping" package 158 unfortunately has been archived recently, so we have omitted that citation.

159
Perhaps the authors want to update the manuscript by including some of the new 160 features from the current version (0.2.0) of the "spmodel" package.

161
-We have added an additional subsection in the "Advanced Features" section 162 titled "Fitting and Predicting for Multiple Models" that details a main addition of v0.2.0 of spmodel -fitting and predicting for multiple models at 164 once.